<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/** 
<span class='line'>  2</span> * @fileoverview 공통 > SVG와 VML을 이용한 선 그리기
<span class='line'>  3</span> * @author dioong
<span class='line'>  4</span> */</span><span class="WHIT">
<span class='line'>  5</span> </span><span class="NAME">nhn</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">window.nhn</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  6</span> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  7</span> </span><span class="NAME">nhn.newsstand.common</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.common</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>  8</span> </span><span class="COMM">/**
<span class='line'>  9</span>  * @static
<span class='line'> 10</span>  * @class  공통 > 선 데이터를 가공 및 SVG/VML의 인터페이스를 통일
<span class='line'> 11</span>  */</span><span class="WHIT">
<span class='line'> 12</span> </span><span class="NAME">nhn.newsstand.common.pathManger</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 13</span> </span><span class="WHIT">	</span><span class="NAME">_elContainer</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'> 14</span> </span><span class="WHIT">	</span><span class="NAME">_oPainter</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 15</span> </span><span class="WHIT">	</span><span class="NAME">_oPath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">	</span><span class="COMM">//각 path들을 담는 hash객체</span><span class="WHIT">
<span class='line'> 16</span> </span><span class="WHIT">	</span><span class="NAME">_bAvailableSVG</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 17</span> </span><span class="WHIT">	</span><span class="NAME">_nCurrentDPI</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">300</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 18</span> </span><span class="WHIT">	</span><span class="NAME">_DEFAULTDPI</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">300</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 19</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 20</span> 	 * nhn.newsstand.common.pathManger 객체 초기화
<span class='line'> 21</span> 	 * @param {Hashtable} oOptions 옵션 값.
<span class='line'> 22</span> 	 */</span><span class="WHIT">
<span class='line'> 23</span> </span><span class="WHIT">	</span><span class="NAME">init</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">oOptions</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 24</span> </span><span class="WHIT">		</span><span class="NAME">this._elContainer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">oOptions.elContainer</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 25</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.common.pathPainter</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 26</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter.init</span><span class="PUNC">(</span><span class="NAME">this._elContainer</span><span class="PUNC">,</span><span class="NAME">oOptions.bubbllerClass</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 27</span> </span><span class="WHIT">		</span><span class="NAME">this._bAvailableSVG</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">$Agent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">navigator</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">ie</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">$Agent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">navigator</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">version</span><span class="WHIT"> </span><span class="PUNC">&lt;=</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 28</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 29</span> </span><span class="WHIT">		</span><span class="NAME">this._strokeOption</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 30</span> </span><span class="WHIT">			</span><span class="STRN">'LINEWEIGHT'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">oOptions</span><span class="PUNC">[</span><span class="STRN">"border"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"LINEWEIGHT"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 31</span> </span><span class="WHIT">			</span><span class="STRN">'COLOR'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">oOptions</span><span class="PUNC">[</span><span class="STRN">"border"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"COLOR"</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 32</span> </span><span class="WHIT">			</span><span class="STRN">'style'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'round'</span><span class="WHIT">
<span class='line'> 33</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'> 35</span> </span><span class="WHIT">		</span><span class="NAME">this._htPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 36</span> </span><span class="COMM">//		this._htPath[this._DEFAULTDPI] = {};</span><span class="WHIT">
<span class='line'> 37</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 38</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 39</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 40</span> 	 * 그려진 Path를 모두 제거하는 interface
<span class='line'> 41</span> 	 * */</span><span class="WHIT">
<span class='line'> 42</span> </span><span class="WHIT">	</span><span class="NAME">clearPath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 43</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter.clearPath</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 44</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 45</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 46</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 47</span> 	 * 서버에서 던져주는 좌표 데이터를 사용하기 쉽게 hash형태로 초기화 시키는 함수.
<span class='line'> 48</span> 	 * @param {Array} aPathData 좌표 데이터.
<span class='line'> 49</span> 	 * @param {String} sSide 좌/우측 면  ("left"|"right")
<span class='line'> 50</span> 	 * */</span><span class="WHIT">
<span class='line'> 51</span> </span><span class="WHIT">	</span><span class="NAME">setPathData</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aPathData</span><span class="PUNC">,</span><span class="NAME">sSide</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 52</span> </span><span class="WHIT">		</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 53</span> </span><span class="WHIT">		</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">this._DEFAULTDPI</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 54</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 55</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aTemp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 56</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPathData.length</span><span class="PUNC">;</span><span class="NAME">i</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">						</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">			</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">this._DEFAULTDPI</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">aPathData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"articleId"</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 58</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">length</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPathData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"outlines"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"outline"</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">;</span><span class="NAME">j</span><span class="PUNC">&lt;</span><span class="NAME">length</span><span class="PUNC">;</span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 59</span> </span><span class="WHIT">				</span><span class="NAME">aTemp</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPathData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"outlines"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"outline"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">split</span><span class="PUNC">(</span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 60</span> </span><span class="WHIT">				</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">this._DEFAULTDPI</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">aPathData</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="STRN">"articleId"</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">push</span><span class="PUNC">(</span><span class="PUNC">[</span><span class="NAME">aTemp</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">,</span><span class="NAME">aTemp</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 61</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 62</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 63</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 66</span> 	 * path를 실제로 페이지에 그리는 함수 
<span class='line'> 67</span> 	 * @param {Number} nDPI 배율
<span class='line'> 68</span> 	 * @param {Number} nExtraLeft 추가 left 값. 우측 페이지에 그릴 경우 한면의 너비가 더 추가된다.
<span class='line'> 69</span> 	 */</span><span class="WHIT">
<span class='line'> 70</span> </span><span class="WHIT">	</span><span class="NAME">createPathes</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">nExtraLeft</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 71</span> </span><span class="WHIT">		</span><span class="NAME">this._nCurrentDPI</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 72</span> </span><span class="WHIT">		</span><span class="NAME">this.multiplicate</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="STRN">"left"</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="WHIT">		</span><span class="NAME">this.multiplicate</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="STRN">"right"</span><span class="PUNC">,</span><span class="NAME">nExtraLeft</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 74</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 75</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter._createHolder</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">				</span><span class="COMM">//우선 각각의 container를 만든다. SVG는 큰 SVG판을 하나 만들고, VML은 DIV을 하나 만들고,SVG는 Svg element에 이런저런 속성 값을 주고...</span><span class="WHIT">
<span class='line'> 76</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter.paintPathes</span><span class="PUNC">(</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="STRN">"left"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">nDPI</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 77</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter.paintPathes</span><span class="PUNC">(</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="STRN">"right"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">nDPI</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 78</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 79</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'> 81</span> 	 * path제거 함수 
<span class='line'> 82</span> 	 */</span><span class="WHIT">
<span class='line'> 83</span> </span><span class="WHIT">	</span><span class="NAME">removePath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 84</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 85</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elParent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 86</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">this._bAvailableSVG</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">sSVGTagName</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">$Agent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">navigator</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">firefox</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT">  </span><span class="STRN">"svg:svg"</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">"svg"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 88</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'> 89</span> </span><span class="WHIT">			</span><span class="NAME">elParent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._elContainer.getElementsByTagName</span><span class="PUNC">(</span><span class="NAME">sSVGTagName</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'> 90</span> </span><span class="WHIT">			</span><span class="NAME">aPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elParent.getElementsByTagName</span><span class="PUNC">(</span><span class="STRN">"path"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 91</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 92</span> </span><span class="WHIT">			</span><span class="NAME">elParent</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$$.getSingle</span><span class="PUNC">(</span><span class="STRN">" > div"</span><span class="PUNC">,</span><span class="NAME">this._elContainer</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 93</span> </span><span class="WHIT">			</span><span class="NAME">aPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$$</span><span class="PUNC">(</span><span class="STRN">"shape"</span><span class="PUNC">,</span><span class="NAME">elParent</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> 		 			</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 95</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPath.length</span><span class="PUNC">-</span><span class="NUMB">1</span><span class="PUNC">,</span><span class="NAME">len</span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">aPath.length</span><span class="PUNC">;</span><span class="NAME">i</span><span class="PUNC">>=</span><span class="NUMB">0</span><span class="PUNC">;</span><span class="NAME">i</span><span class="PUNC">--</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 96</span> </span><span class="WHIT">			</span><span class="NAME">elParent.removeChild</span><span class="PUNC">(</span><span class="NAME">aPath</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'> 97</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'> 98</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 99</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>100</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>101</span> 	 * path좌표 배율 계산해서 멤버 변수에 저장하는 함수. 
<span class='line'>102</span> 	 * @param {Number} nDPI  배율
<span class='line'>103</span> 	 * @param {String} sSide 좌/우측 면  ("left"|"right")
<span class='line'>104</span> 	 * @param {Number} nExtraLeft 추가 left 값. 우측 페이지에 그릴 경우 한면의 너비가 더 추가된다.
<span class='line'>105</span> 	 */</span><span class="WHIT">
<span class='line'>106</span> </span><span class="WHIT">	</span><span class="NAME">multiplicate</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">sSide</span><span class="PUNC">,</span><span class="NAME">nExtraLeft</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>107</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="KEYW">typeof</span><span class="WHIT"> </span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">nDPI</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">!=</span><span class="WHIT"> </span><span class="STRN">"undefined"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>108</span> </span><span class="WHIT">		</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">nDPI</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">this._DEFAULTDPI</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>110</span> </span><span class="WHIT">			</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">nDPI</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>111</span> </span><span class="WHIT">			</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">j</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="PUNC">=</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">this._DEFAULTDPI</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">length</span><span class="PUNC">;</span><span class="NAME">j</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">j</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>112</span> </span><span class="WHIT">				</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">nDPI</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">						</span><span class="WHIT">
<span class='line'>113</span> </span><span class="WHIT">				</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">nDPI</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.common.util.roundXL</span><span class="PUNC">(</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">this._DEFAULTDPI</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">/</span><span class="NUMB">300</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="WHIT"> </span><span class="NAME">nExtraLeft</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>114</span> </span><span class="WHIT">				</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">nDPI</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nhn.newsstand.common.util.roundXL</span><span class="PUNC">(</span><span class="NAME">this._htPath</span><span class="PUNC">[</span><span class="NAME">sSide</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">this._DEFAULTDPI</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">j</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NUMB">1</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">*</span><span class="WHIT"> </span><span class="NAME">nDPI</span><span class="PUNC">/</span><span class="NUMB">300</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>115</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>116</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>118</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>119</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>120</span> 	 * 특정 path 보여주는 함수
<span class='line'>121</span> 	 * @param {String} sArticleId 보여줄 Path의 ID 값
<span class='line'>122</span> 	 * @param {Number} nDPI 배율
<span class='line'>123</span> 	 * @param {String} sType 노출 타입 ("OVER"|"SELECT")
<span class='line'>124</span> 	 */</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">	</span><span class="NAME">showPathBtArticleId</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">,</span><span class="NAME">nDPI</span><span class="PUNC">,</span><span class="NAME">sType</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>126</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>127</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">elPath.tagName.toLowerCase</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"path"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>128</span> </span><span class="WHIT">			</span><span class="NAME">elPath.style.opacity</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">1</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>129</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"stroke"</span><span class="PUNC">,</span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"COLOR"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">sType</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>130</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"stroke-width"</span><span class="PUNC">,</span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"LINEWEIGHT"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="COMM">//VML에 비해 선이 4배정도 두껍다.</span><span class="WHIT">
<span class='line'>131</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"fill-opacity"</span><span class="PUNC">,</span><span class="STRN">"0"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>132</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"stroke-opacity"</span><span class="PUNC">,</span><span class="STRN">"1"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">			</span><span class="NAME">elPath.style.display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"block"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>134</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>135</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elStroke</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elPath.getElementsByTagName</span><span class="PUNC">(</span><span class="STRN">"stroke"</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>136</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">elStroke</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>137</span> </span><span class="WHIT">				</span><span class="NAME">elStroke.opacity</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"100%"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>138</span> </span><span class="WHIT">				</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"strokecolor"</span><span class="PUNC">,</span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"COLOR"</span><span class="PUNC">]</span><span class="PUNC">[</span><span class="NAME">sType</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>139</span> </span><span class="WHIT">				</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"strokeweight"</span><span class="PUNC">,</span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"LINEWEIGHT"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">							</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>141</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>142</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>143</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>144</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>145</span> 	 * 특정 path 숨기는 함수
<span class='line'>146</span> 	 * @param {String} sArticleId 숨길 Path의 ID 값
<span class='line'>147</span> 	 */</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT">	</span><span class="NAME">hidePath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>149</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="NAME">sArticleId</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>150</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">elPath</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT"> </span><span class="KEYW">return</span><span class="PUNC">;</span><span class="WHIT"> </span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>151</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">elPath.tagName.toLowerCase</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">==</span><span class="WHIT"> </span><span class="STRN">"path"</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">						</span><span class="WHIT">
<span class='line'>152</span> </span><span class="WHIT">			</span><span class="NAME">elPath.style.opacity</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">;</span><span class="WHIT">						</span><span class="WHIT">
<span class='line'>153</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">					</span><span class="WHIT">
<span class='line'>154</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elStroke</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elPath.getElementsByTagName</span><span class="PUNC">(</span><span class="STRN">"stroke"</span><span class="PUNC">)</span><span class="PUNC">[</span><span class="NUMB">0</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>155</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">elStroke</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">				</span><span class="NAME">elStroke.opacity</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"0%"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>157</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>158</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>159</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>160</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>161</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>162</span> 	 * path 너비 변경하는 interface
<span class='line'>163</span> 	 * @param {Number} nWidth  너비 값
<span class='line'>164</span> 	 */</span><span class="WHIT">
<span class='line'>165</span> </span><span class="WHIT">	</span><span class="NAME">changePathWidth</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>166</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter.changePathWidth</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>167</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>168</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>169</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>170</span> 	 * path 색상 변경하는 interface
<span class='line'>171</span> 	 * @param {String} sColor 색상 값
<span class='line'>172</span> 	 */</span><span class="WHIT">
<span class='line'>173</span> </span><span class="WHIT">	</span><span class="NAME">changePathColor</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sColor</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>174</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter.changePathColor</span><span class="PUNC">(</span><span class="NAME">sColor</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>175</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>176</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>178</span> 	 * path 스타일 변경하는 interface
<span class='line'>179</span> 	 * @param {String} sColor 스타일 값
<span class='line'>180</span> 	 */</span><span class="WHIT">
<span class='line'>181</span> </span><span class="WHIT">	</span><span class="NAME">changePathStyle</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sStyle</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>182</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter.changePathStyle</span><span class="PUNC">(</span><span class="NAME">sStyle</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>183</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>184</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>186</span> 	 * Path를 그릴 영역을 너비와 높이 값을 지정하는 interface
<span class='line'>187</span> 	 * @param {Number} nWidth 너비 값
<span class='line'>188</span> 	 * @param {Number} nHeight 높이 값
<span class='line'>189</span> 	 */</span><span class="WHIT">
<span class='line'>190</span> </span><span class="WHIT">	</span><span class="NAME">setPaperSize</span><span class="WHIT">  </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">,</span><span class="NAME">nHeight</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>191</span> </span><span class="WHIT">		</span><span class="NAME">this._oPainter.setPaperSize</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">,</span><span class="NAME">nHeight</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>192</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>193</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>194</span> 
<span class='line'>195</span> </span><span class="COMM">/**
<span class='line'>196</span>  * @static
<span class='line'>197</span>  * @class  공통 > SVG와 VML을 이용한 선 그리기
<span class='line'>198</span>  */</span><span class="WHIT">
<span class='line'>199</span> </span><span class="NAME">nhn.newsstand.common.pathPainter</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>200</span> </span><span class="WHIT">	</span><span class="NAME">_bAvailableSVG</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>201</span> </span><span class="WHIT">	</span><span class="NAME">_elContainer</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>202</span> </span><span class="WHIT">	</span><span class="NAME">_holder</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>203</span> </span><span class="WHIT">	</span><span class="NAME">_pos</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>204</span> </span><span class="WHIT">	</span><span class="NAME">_strokeOption</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>205</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>206</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>207</span> 	 * nhn.newsstand.common.pathPainter 객체 초기화
<span class='line'>208</span> 	 * 실제로 Path를 그리는 객체
<span class='line'>209</span> 	 * @param {Hashtable} oOptions 옵션 값.
<span class='line'>210</span> 	 * @param {String} sBubbler 이벤트 버블링 시그니쳐
<span class='line'>211</span> 	 */</span><span class="WHIT">
<span class='line'>212</span> </span><span class="WHIT">	</span><span class="NAME">init</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">elContainer</span><span class="PUNC">,</span><span class="NAME">sBubbler</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>213</span> </span><span class="WHIT">		</span><span class="NAME">this._bAvailableSVG</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">(</span><span class="NAME">$Agent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">navigator</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">ie</span><span class="WHIT"> </span><span class="PUNC">&&</span><span class="WHIT"> </span><span class="NAME">$Agent</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">navigator</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">version</span><span class="WHIT"> </span><span class="PUNC">&lt;=</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">?</span><span class="WHIT"> </span><span class="KEYW">false</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">true</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>214</span> </span><span class="WHIT">		</span><span class="NAME">this._elContainer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">elContainer</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>215</span> </span><span class="WHIT">		</span><span class="NAME">this._sBubbler</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sBubbler</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>216</span> </span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>217</span> </span><span class="WHIT">		</span><span class="NAME">this._strokeOption</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>218</span> </span><span class="WHIT">			</span><span class="STRN">'width'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">2</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>219</span> </span><span class="WHIT">			</span><span class="STRN">'COLOR'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'white'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>220</span> </span><span class="WHIT">			</span><span class="STRN">'style'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="STRN">'round'</span><span class="WHIT">
<span class='line'>221</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>222</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>223</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>224</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>225</span> 	 * 그려진 Path를 모두 제거하는 함수
<span class='line'>226</span> 	 * */</span><span class="WHIT">
<span class='line'>227</span> </span><span class="WHIT">	</span><span class="NAME">clearPath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>228</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">this._holder</span><span class="WHIT"> </span><span class="PUNC">!==</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>229</span> </span><span class="WHIT">			</span><span class="NAME">this._holder.parentNode.removeChild</span><span class="PUNC">(</span><span class="NAME">this._holder</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>230</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>231</span> </span><span class="WHIT">		</span><span class="NAME">this._holder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>232</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>233</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>234</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>235</span> 	 * Path를 그릴 영역을 너비와 높이 값을 지정한다.
<span class='line'>236</span> 	 * @param {Number} nWidth 너비 값
<span class='line'>237</span> 	 * @param {Number} nHeight 높이 값
<span class='line'>238</span> 	 */</span><span class="WHIT">
<span class='line'>239</span> </span><span class="WHIT">	</span><span class="NAME">setPaperSize</span><span class="WHIT">  </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">,</span><span class="NAME">nHeight</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>240</span> </span><span class="WHIT">		</span><span class="NAME">this._htPaperSize</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>241</span> </span><span class="WHIT">			</span><span class="STRN">'width'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nWidth</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>242</span> </span><span class="WHIT">			</span><span class="STRN">'height'</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NAME">nHeight</span><span class="WHIT">
<span class='line'>243</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>244</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>245</span> 
<span class='line'>246</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>247</span> 	 * path(복수의 갯수)를 그리는 함수.
<span class='line'>248</span> 	 * @param {Hashtable} htPagePath pathdata를 가지고 있는 hash 객체
<span class='line'>249</span> 	 */</span><span class="WHIT">
<span class='line'>250</span> </span><span class="WHIT">	</span><span class="NAME">paintPathes</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">htPagePath</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">							</span><span class="COMM">// 좌표값 multiplicate시킨 후 받아오고</span><span class="WHIT">
<span class='line'>251</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>252</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="KEYW">in</span><span class="WHIT"> </span><span class="NAME">htPagePath</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>253</span> </span><span class="WHIT">			</span><span class="NAME">elPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._createPath</span><span class="PUNC">(</span><span class="NAME">htPagePath</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>254</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"id"</span><span class="PUNC">,</span><span class="NAME">i</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>255</span> </span><span class="WHIT">			</span><span class="NAME">this._setBubblerSignature</span><span class="PUNC">(</span><span class="NAME">elPath</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>256</span> </span><span class="WHIT">			</span><span class="NAME">this._holder.appendChild</span><span class="PUNC">(</span><span class="NAME">elPath</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="COMM">//path를 만들어 붙인다.</span><span class="WHIT">
<span class='line'>257</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>258</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>259</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>260</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>261</span> 	 * 이벤트 버블링 대상 Element에 버블링 시그니쳐를 할당하는 함수 
<span class='line'>262</span> 	 * @param {HTMLElement} elPath 이벤트 버블링 대상 Element
<span class='line'>263</span> 	 */</span><span class="WHIT">
<span class='line'>264</span> </span><span class="WHIT">	</span><span class="NAME">_setBubblerSignature</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">elPath</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>265</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">this._bAvailableSVG</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>266</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"class"</span><span class="PUNC">,</span><span class="NAME">this._sBubbler</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="COMM">//SVG에서는 class명을  attribute로 설정하면 className으로 가져올 수 있다.</span><span class="WHIT">
<span class='line'>267</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>268</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"className"</span><span class="PUNC">,</span><span class="NAME">this._sBubbler</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="COMM">//VML에서는 class명을 className으로 attribute로 설정하면 className으로 가져올 수 있다.</span><span class="WHIT">
<span class='line'>269</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>270</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>271</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>272</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>273</span> 	 * path 상위의 Holder Element를 만들어주는 함수.
<span class='line'>274</span> 	 */</span><span class="WHIT">
<span class='line'>275</span> </span><span class="WHIT">	</span><span class="NAME">_createHolder</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>276</span> </span><span class="WHIT">		</span><span class="NAME">this._holder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>277</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">this._bAvailableSVG</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>278</span> </span><span class="WHIT">			</span><span class="NAME">this._holder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElementNS</span><span class="PUNC">(</span><span class="STRN">"http://www.w3.org/2000/svg"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"svg:svg"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>279</span> </span><span class="WHIT">			</span><span class="NAME">this._holder.setAttributeNS</span><span class="PUNC">(</span><span class="STRN">"http://www.w3.org/2000/xmlns/"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"xmlns:xlink"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"http://www.w3.org/1999/xlink"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>280</span> </span><span class="WHIT">			</span><span class="NAME">this._holder.setAttribute</span><span class="PUNC">(</span><span class="STRN">"version"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"1.1"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">						</span><span class="WHIT">
<span class='line'>281</span> </span><span class="WHIT">			</span><span class="NAME">this._holder.setAttribute</span><span class="PUNC">(</span><span class="STRN">'width'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this._htPaperSize.width</span><span class="PUNC">+</span><span class="STRN">"px"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>282</span> </span><span class="WHIT">			</span><span class="NAME">this._holder.setAttribute</span><span class="PUNC">(</span><span class="STRN">'height'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">this._htPaperSize.height</span><span class="PUNC">+</span><span class="STRN">"px"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>283</span> </span><span class="WHIT">			</span><span class="NAME">this._holder.setAttribute</span><span class="PUNC">(</span><span class="STRN">'viewBox'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">"0 0 "</span><span class="PUNC">+</span><span class="NAME">this._htPaperSize.width</span><span class="PUNC">+</span><span class="STRN">" "</span><span class="PUNC">+</span><span class="NAME">this._htPaperSize.height</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="COMM">//viewbox는 x,y, width, height값 순서이다.</span><span class="WHIT">
<span class='line'>284</span> </span><span class="WHIT">			</span><span class="COMM">//this._holder.setAttribute('overflow', 'visible');</span><span class="WHIT">
<span class='line'>285</span> </span><span class="WHIT">			</span><span class="NAME">this._holder.style.zIndex</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NUMB">9</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>286</span> </span><span class="WHIT">			</span><span class="NAME">$Element</span><span class="PUNC">(</span><span class="NAME">this._holder</span><span class="PUNC">)</span><span class="PUNC">.</span><span class="NAME">css</span><span class="PUNC">(</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>287</span> </span><span class="WHIT">				</span><span class="STRN">'position'</span><span class="PUNC">:</span><span class="STRN">'absolute'</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="WHIT">
<span class='line'>288</span> </span><span class="WHIT">				</span><span class="STRN">'overflow'</span><span class="PUNC">:</span><span class="STRN">'visible'</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>289</span> </span><span class="WHIT">				</span><span class="STRN">'top'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>290</span> </span><span class="WHIT">				</span><span class="STRN">'left'</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT">
<span class='line'>291</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>292</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>293</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>294</span> </span><span class="WHIT">			</span><span class="NAME">this._holder</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">$</span><span class="PUNC">(</span><span class="STRN">'&lt;div style="position:absolute;overflow:visible;top:0px;left:0px;width:'</span><span class="PUNC">+</span><span class="NAME">this._htPaperSize.width</span><span class="PUNC">+</span><span class="STRN">'px;height:'</span><span class="PUNC">+</span><span class="NAME">this._htPaperSize.height</span><span class="PUNC">+</span><span class="STRN">'px;zIndex:9">&lt;/div>'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">				</span><span class="WHIT">
<span class='line'>295</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>296</span> </span><span class="WHIT">		</span><span class="NAME">this._elContainer.appendChild</span><span class="PUNC">(</span><span class="NAME">this._holder</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT"> 		</span><span class="COMM">// 그리곤 그걸 document의 DOM예 붙인다.</span><span class="WHIT">
<span class='line'>297</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>298</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>299</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>300</span> 	 * path를 만들어주는 함수.
<span class='line'>301</span> 	 * @param {Array} aPathData path line data를 가지고 있는 배열
<span class='line'>302</span> 	 */</span><span class="WHIT">
<span class='line'>303</span> </span><span class="WHIT">	</span><span class="NAME">_createPath</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">aPathData</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>304</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">null</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>305</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">this._bAvailableSVG</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>306</span> </span><span class="WHIT">			</span><span class="NAME">elPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElementNS</span><span class="PUNC">(</span><span class="STRN">"http://www.w3.org/2000/svg"</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="STRN">'path'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>307</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"stroke"</span><span class="PUNC">,</span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"COLOR"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>308</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"stroke-width"</span><span class="PUNC">,</span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"LINEWEIGHT"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>309</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"fill-opacity"</span><span class="PUNC">,</span><span class="STRN">"0"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>310</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"stroke-opacity"</span><span class="PUNC">,</span><span class="STRN">"0.1"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>311</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"d"</span><span class="PUNC">,</span><span class="NAME">this._getPathData</span><span class="PUNC">(</span><span class="NAME">aPathData</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">				</span><span class="WHIT">
<span class='line'>312</span> </span><span class="WHIT">			</span><span class="NAME">elPath.style.display</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"block"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>313</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>314</span> </span><span class="WHIT">			</span><span class="NAME">elPath</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">'v:shape'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">										</span><span class="WHIT">
<span class='line'>315</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"strokecolor"</span><span class="PUNC">,</span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"COLOR"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>316</span> 
<span class='line'>317</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"coordsize"</span><span class="PUNC">,</span><span class="NAME">this._htPaperSize.width</span><span class="PUNC">+</span><span class="STRN">" "</span><span class="PUNC">+</span><span class="NAME">this._htPaperSize.height</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="COMM">//coordisize와 svg의 viewbox는 대응됨.</span><span class="WHIT">
<span class='line'>318</span> </span><span class="WHIT">			</span><span class="NAME">elPath.style.top</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"0px"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>319</span> </span><span class="WHIT">			</span><span class="NAME">elPath.style.left</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"0px"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>320</span> </span><span class="WHIT">			</span><span class="NAME">elPath.style.width</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._htPaperSize.width</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="COMM">/*SVG의 width/height는 v:shape Element의 width/height 값과 같아야 한다.*/</span><span class="WHIT">
<span class='line'>321</span> </span><span class="WHIT">			</span><span class="NAME">elPath.style.height</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">this._htPaperSize.height</span><span class="WHIT"> </span><span class="PUNC">+</span><span class="STRN">"px"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>322</span> </span><span class="WHIT">			</span><span class="NAME">elPath.style.position</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="STRN">"absolute"</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>323</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">"strokeweight"</span><span class="PUNC">,</span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"LINEWEIGHT"</span><span class="PUNC">]</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>324</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>325</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elFill</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">'v:fill'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>326</span> </span><span class="WHIT">			</span><span class="NAME">elFill.setAttribute</span><span class="PUNC">(</span><span class="STRN">"opacity"</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>327</span> </span><span class="WHIT">			</span><span class="WHIT">
<span class='line'>328</span> </span><span class="WHIT">			</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">elStroke</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">document.createElement</span><span class="PUNC">(</span><span class="STRN">'v:stroke'</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>329</span> </span><span class="WHIT">			</span><span class="NAME">elStroke.setAttribute</span><span class="PUNC">(</span><span class="STRN">"opacity"</span><span class="PUNC">,</span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>330</span> </span><span class="WHIT">						</span><span class="WHIT">
<span class='line'>331</span> </span><span class="WHIT">			</span><span class="NAME">elPath.appendChild</span><span class="PUNC">(</span><span class="NAME">elFill</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>332</span> </span><span class="WHIT">			</span><span class="NAME">elPath.appendChild</span><span class="PUNC">(</span><span class="NAME">elStroke</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>333</span> </span><span class="WHIT">			</span><span class="NAME">elPath.setAttribute</span><span class="PUNC">(</span><span class="STRN">'Path'</span><span class="PUNC">,</span><span class="NAME">this._getPathData</span><span class="PUNC">(</span><span class="NAME">aPathData</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="COMM">//path 그리기</span><span class="WHIT">
<span class='line'>334</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>335</span> </span><span class="WHIT">		</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">elPath</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>336</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>337</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>338</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>339</span> 	 * VML또는 SGV에 알맞는 path String data를 만들어주는 함수.
<span class='line'>340</span> 	 * @param {Array} array path data를 가지고 있는 배열
<span class='line'>341</span> 	 * @return {String} 좌표값
<span class='line'>342</span> 	 */</span><span class="WHIT">
<span class='line'>343</span> </span><span class="WHIT">	</span><span class="NAME">_getPathData</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">array</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>344</span> </span><span class="WHIT">		</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">aBuffer</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">[</span><span class="PUNC">]</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>345</span> </span><span class="WHIT">		</span><span class="KEYW">for</span><span class="PUNC">(</span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="NUMB">0</span><span class="PUNC">,</span><span class="NAME">len</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">array.length</span><span class="PUNC">;</span><span class="NAME">i</span><span class="PUNC">&lt;</span><span class="NAME">len</span><span class="PUNC">;</span><span class="NAME">i</span><span class="PUNC">++</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>346</span> </span><span class="WHIT">			</span><span class="NAME">aBuffer.push</span><span class="PUNC">(</span><span class="NAME">array</span><span class="PUNC">[</span><span class="NAME">i</span><span class="PUNC">]</span><span class="PUNC">.</span><span class="NAME">join</span><span class="PUNC">(</span><span class="STRN">","</span><span class="PUNC">)</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>347</span> </span><span class="WHIT">			</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">i</span><span class="WHIT"> </span><span class="PUNC">===</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>348</span> </span><span class="WHIT">				</span><span class="NAME">aBuffer.push</span><span class="PUNC">(</span><span class="STRN">"L"</span><span class="PUNC">)</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>349</span> </span><span class="WHIT">			</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>350</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>351</span> </span><span class="WHIT">		</span><span class="KEYW">if</span><span class="PUNC">(</span><span class="NAME">this._bAvailableSVG</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>352</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"M "</span><span class="PUNC">+</span><span class="NAME">aBuffer.join</span><span class="PUNC">(</span><span class="STRN">" "</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="STRN">" Z"</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>353</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="KEYW">else</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>354</span> </span><span class="WHIT">			</span><span class="KEYW">return</span><span class="WHIT"> </span><span class="STRN">"M "</span><span class="PUNC">+</span><span class="NAME">aBuffer.join</span><span class="PUNC">(</span><span class="STRN">" "</span><span class="PUNC">)</span><span class="PUNC">+</span><span class="STRN">" X E"</span><span class="PUNC">;</span><span class="WHIT">		</span><span class="WHIT">
<span class='line'>355</span> </span><span class="WHIT">		</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>356</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>357</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>358</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>359</span> 	 * path 너비 변경하는 함수
<span class='line'>360</span> 	 * @param {Number} nWidth  너비 값
<span class='line'>361</span> 	 */</span><span class="WHIT">
<span class='line'>362</span> </span><span class="WHIT">	</span><span class="NAME">changePathWidth</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">nWidth</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>363</span> </span><span class="WHIT">		</span><span class="NAME">this._strokeOption</span><span class="PUNC">[</span><span class="STRN">"LINEWEIGHT"</span><span class="PUNC">]</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">nWidth</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>364</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>365</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>366</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>367</span> 	 * path 색상 변경하는 함수
<span class='line'>368</span> 	 * @param {Number} sColor 색상 값
<span class='line'>369</span> 	 */</span><span class="WHIT">
<span class='line'>370</span> </span><span class="WHIT">	</span><span class="NAME">changePathColor</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sColor</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>371</span> </span><span class="WHIT">		</span><span class="NAME">this._strokeOption.color</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sColor</span><span class="PUNC">;</span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>372</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>373</span> </span><span class="WHIT">	</span><span class="WHIT">
<span class='line'>374</span> </span><span class="WHIT">	</span><span class="COMM">/**
<span class='line'>375</span> 	 * path 스타일 변경하는 함수
<span class='line'>376</span> 	 * @param {String} sStyle 스타일 값
<span class='line'>377</span> 	 */</span><span class="WHIT">
<span class='line'>378</span> </span><span class="WHIT">	</span><span class="NAME">changePathStyle</span><span class="WHIT"> </span><span class="PUNC">:</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">sStyle</span><span class="PUNC">)</span><span class="PUNC">{</span><span class="WHIT">
<span class='line'>379</span> </span><span class="WHIT">		</span><span class="NAME">this._strokeOption.style</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">sStyle</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>380</span> </span><span class="WHIT">	</span><span class="PUNC">}</span><span class="WHIT">
<span class='line'>381</span> </span><span class="PUNC">}</span><span class="PUNC">;</span></pre></body></html>